export let flowConfig = {
	jsPlumbInsConfig: {
		Connector: [
			'Flowchart',
			{
				gap: 5,
				cornerRadius: 8,
				alwaysRespectStubs: true,
			},
		],
		ConnectionOverlays: [
			[
				'Arrow',
				{
					width: 10,
					length: 10,
					location: 1,
				},
			],
		],
		PaintStyle: {
			stroke: '#2a2929',
			strokeWidth: 2,
		},
		HoverPaintStyle: {
			stroke: '#409EFF',
			strokeWidth: 3,
		},
		EndpointStyle: {
			fill: '#456',
			stroke: '#2a2929',
			strokeWidth: 1,
			radius: 3,
		},
		EndpointHoverStyle: {
			fill: 'pink',
		},
	},
	jsPlumbConfig: {
		anchor: {
			default: ['Bottom', 'Right', 'Top', 'Left'],
		},
		conn: {
			isDetachable: false,
		},
		makeSourceConfig: {
			filter: 'a',
			filterExclude: true,
			maxConnections: -1,
			endpoint: ['Dot', { radius: 7 }],
			anchor: ['Bottom', 'Right', 'Top', 'Left'],
		},
		makeTargetConfig: {
			filter: 'a',
			filterExclude: true,
			maxConnections: -1,
			endpoint: ['Dot', { radius: 7 }],
			anchor: ['Bottom', 'Right', 'Top', 'Left'],
		},
	},
	defaultStyle: {
		dragOpacity: 0.7,
		alignGridPX: [5, 5],
		alignSpacing: {
			level: 100,
			vertical: 100,
		},
		alignDuration: 300,
		containerScale: {
			init: 1,
			min: 0.5,
			max: 3,
			onceNarrow: 0.1,
			onceEnlarge: 0.1,
		},
		isOpenAuxiliaryLine: true,
		showAuxiliaryLineDistance: 20,
		movePx: 5,
		photoBlankDistance: 200,
	},
	// ID的生成类型。1.uuid uuid 2.time_stamp 时间戳 3.sequence 序列 4.time_stamp_and_sequence 时间戳加序列 5.custom 自定义
	idType: 'uuid',
	flowStatus: {
		CREATE: '0',
		SAVE: '1',
		MODIFY: '2',
		LOADING: '3',
	},
	shortcut: {
		multiple: {
			code: 17,
			codeName: 'CTRL',
			shortcutName: $t('duo-xuan'),
		},
		dragContainer: {
			code: 32,
			codeName: 'SPACE',
			shortcutName: $t('hua-bu-tuo-zhuai'),
		},
		scaleContainer: {
			code: 18,
			codeName: 'ALT(firefox下为SHIFT)',
			shortcutName: $t('hua-bu-suo-fang'),
		},
		dragTool: {
			code: 68,
			codeName: 'D',
			shortcutName: $t('tuo-zhuai-gong-jv'),
		},
		connTool: {
			code: 76,
			codeName: 'L',
			shortcutName: $t('lian-xian-gong-jv'),
		},
		zoomInTool: {
			code: 190,
			codeName: '<',
			shortcutName:$t('fang-da-gong-jv'),
		},
		zoomOutTool: {
			code: 188,
			codeName: '>',
			shortcutName: $t('suo-xiao-gong-jv'),
		},
		leftMove: {
			code: 37,
			codeName: '←',
			shortcutName: $t('zuo-yi'),
		},
		upMove: {
			code: 38,
			codeName: '↑',
			shortcutName:$t('shang-yi'),
		},
		rightMove: {
			code: 39,
			codeName: '→',
			shortcutName: $t('you-yi'),
		},
		downMove: {
			code: 40,
			codeName: '↓',
			shortcutName: $t('xia-yi'),
		},
		testModal: {
			code: 84,
			codeName: 'CTRL+ALT+P',
			shortcutName: $t('da-kai-ce-shi-yie-mian'),
		},
	},
	contextMenu: {
		container: {
			menuName: 'flow-menu',
			axis: {
				x: null,
				y: null,
			},
			menulists: [
				// {
				// 	fnHandler: 'flowInfo',
				// 	icoName: 'edit',
				// 	btnName: '流程图信息'
				// },
				{
					fnHandler: 'paste',
					icoName: 'edit',
					btnName: $t('zhan-tie'),
				},
				{
					fnHandler: 'selectAll',
					icoName: 'edit',
					btnName: $t('quan-xuan'),
				},
				// {
				// 	fnHandler: 'saveFlow',
				// 	icoName: 'edit',
				// 	btnName: '保存流程'
				// },
				// {
				// 	iconName: 'edit',
				// 	fnHandler: 'addRemark',
				// 	btnName: '添加备注'
				// },
				{
					icoName: 'edit',
					btnName: $t('dui-qig-fang-shi'),
					children: [
						{
							icoName: 'edit',
							fnHandler: 'verticaLeft',
							btnName: $t('chui-zhi-zuo-dui-qig'),
						},
						{
							icoName: 'edit',
							fnHandler: 'verticalCenter',
							btnName: $t('chui-zhi-ju-zhong'),
						},
						{
							icoName: 'edit',
							fnHandler: 'verticalRight',
							btnName: $t('chui-zhi-you-dui-qi'),
						},
						{
							icoName: 'edit',
							fnHandler: 'levelUp',
							btnName: $t('shui-ping-shang-dui-qi'),
						},
						{
							icoName: 'edit',
							fnHandler: 'levelCenter',
							btnName: $t('shui-ping-ju-zhong'),
						},
						{
							icoName: 'edit',
							fnHandler: 'levelDown',
							btnName: $t('shui-ping-xia-dui-qi'),
						},
					],
				},
			],
		},
		node: {
			menuName: 'node-menu',
			axis: {
				x: null,
				y: null,
			},
			menulists: [
				{
					fnHandler: 'copyNode',
					icoName: 'edit',
					btnName: $t('fu-zhi-jie-dian'),
				},
				{
					fnHandler: 'deleteNode',
					icoName: 'edit',
					btnName: $t('shan-chu-jie-dian'),
				},
			],
		},
		link: {
			menuName: 'link-menu',
			axis: {
				x: null,
				y: null,
			},
			menulists: [
				{
					fnHandler: 'deleteLink',
					icoName: 'edit',
					btnName: $t('shan-chu-lian-xian'),
				},
			],
		},
	},
	verificationStyle: {
		0: '#5bc0de', //正在处理
		1: '#7ccb7c', //已完成
		2: '#d9534f', //不同意
		3: '#faad14', //驳回或者撤回
		4: '#f4f6fc',
	}, //还未处理
	flowLineAdditions: [
		{ id: 'CreatedUserId', name: $t('shen-qing-ren') },
		{ id: 'CreatedOrgId', name: $t('suo-shu-zu-zhi') },
	], //连线条件额外参数
};
